home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / X11R4 / cmds / X / ddx / Xmfbpmax / sys / devio.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-24  |  12.3 KB  |  311 lines

  1.  
  2. /*
  3.  *      @(#)devio.h    4.1.1.8    (ULTRIX)    9/17/88
  4.  */
  5.  
  6. /************************************************************************
  7.  *                                    *
  8.  *            Copyright (c) 1986-1988 by            *
  9.  *        Digital Equipment Corporation, Maynard, MA        *
  10.  *            All rights reserved.                *
  11.  *                                    *
  12.  *   This software is furnished under a license and may be used and    *
  13.  *   copied  only  in accordance with the terms of such license and    *
  14.  *   with the  inclusion  of  the  above  copyright  notice.   This    *
  15.  *   software  or  any    other copies thereof may not be provided or    *
  16.  *   otherwise made available to any other person.  No title to and    *
  17.  *   ownership of the software is hereby transferred.            *
  18.  *                                    *
  19.  *   The information in this software is subject to change  without    *
  20.  *   notice  and should not be construed as a commitment by Digital    *
  21.  *   Equipment Corporation.                        *
  22.  *                                    *
  23.  *   Digital assumes no responsibility for the use  or    reliability    *
  24.  *   of its software on equipment which is not supplied by Digital.    *
  25.  *                                    *
  26.  ************************************************************************/
  27.  
  28. /*
  29.  * devio.h
  30.  *
  31.  * Modification history
  32.  *
  33.  * Common structures and definitions for device drivers and ioctl
  34.  *
  35.  * 17-Sep-88 - Ricky Palmer
  36.  *
  37.  *    Updated PMAX SCSI support.
  38.  *
  39.  * 01-Aug-88 - Ricky Palmer
  40.  *
  41.  *    Added PMAX SCSI support.
  42.  *
  43.  * 17-Apr-88 - Ricky Palmer
  44.  *
  45.  *    Added DEV_DSSC and DEV_MSI for MSI support.
  46.  *
  47.  * 20-Feb-88 - Tim Burke
  48.  *
  49.  *      Added DEV_DHB32, a 16 line BI bus terminal mux.
  50.  *
  51.  * 28-Sep-87 - Ricky Palmer
  52.  *
  53.  *    Added new "rctlr_num" field to "devget" structure.
  54.  *
  55.  * 17-May-87 - Ricky Palmer
  56.  *
  57.  *    Updated field for tu78/ta78.
  58.  *
  59.  * 19-Mar-87 -- Fred Canter
  60.  *
  61.  *    Added DEV_XOS for X in kernel special device.
  62.  *
  63.  * 10-Mar-87 - rsp (Ricky Palmer)
  64.  *
  65.  *    Added defines for cx series of controllers, updated dh defines.
  66.  *
  67.  * 14-Jan-87 - Robin
  68.  *
  69.  *    Added rqdx4, rd35
  70.  *
  71.  *  6-Jan-87 -    Fred Canter
  72.  *
  73.  *    Minor changes to some comments.
  74.  *
  75.  *  4-Mar-86 -    Ricky Palmer
  76.  *
  77.  *    Created original file and its contents. V2.0
  78.  *
  79.  * 13-Jun-86 - Jim Woodward
  80.  *
  81.  *    Fix to uba reset and drivers.
  82.  *
  83.  * 11-Jul-86 - Ricky Palmer
  84.  *
  85.  *    Added adpt, nexus fields to basic devget structure. V2.0
  86.  *
  87.  *  5-Aug-86 - Fred Canter
  88.  *
  89.  *    Added defines needed for devioctl support in VAXstation
  90.  *    2000 device drivers.
  91.  *    Changed RD3X to RD32.
  92.  *
  93.  * 6-Aug-86 - Robin Lewis
  94.  *
  95.  *    Added tape density for tk70 and added device entries for
  96.  *    tk70, ra70, ra90, rv80, tu82
  97.  *
  98.  * 7-Aug-86 - Ricky Palmer
  99.  *
  100.  *    Added defines for VT3?? series of terminals. V2.0
  101.  *
  102.  * 27-Aug-86 -- Fred Canter
  103.  *    Bug fix: removed the comma after DEV_MOUSE and DEV_TABLET.
  104.  */
  105.  
  106. /* Basic amount of storage for "interface" and "device" below */
  107. #define DEV_SIZE    0x08        /* Eight bytes            */
  108.  
  109. /* DEV_UGH uprintf macro for driver backward compatibility */
  110. #define DEV_UGH(x,y,z)    uprintf("%s: unit# %d: %s\n",x,y,z)
  111.  
  112. /* Structure for DEVIOCGET ioctl - device get status command */
  113. struct    devget    {
  114.     short    category;        /* Category            */
  115.     short    bus;            /* Bus                */
  116.     char    interface[DEV_SIZE];    /* Interface (string)        */
  117.     char    device[DEV_SIZE];    /* Device (string)        */
  118.     short    adpt_num;        /* Adapter number        */
  119.     short    nexus_num;        /* Nexus or node on adapter no. */
  120.     short    bus_num;        /* Bus number            */
  121.     short    ctlr_num;        /* Controller number        */
  122.     short    rctlr_num;        /* Remote controller number    */
  123.     short    slave_num;        /* Plug or line number        */
  124.     char    dev_name[DEV_SIZE];    /* Ultrix device pneumonic    */
  125.     short    unit_num;        /* Ultrix device unit number    */
  126.     unsigned soft_count;        /* Driver soft error count    */
  127.     unsigned hard_count;        /* Driver hard error count    */
  128.     long    stat;            /* Generic status mask        */
  129.     long    category_stat;        /* Category specific mask    */
  130. };
  131.  
  132. /* Get status definitions for category word (category) */
  133. #define DEV_TAPE    0x00        /* Tape category        */
  134. #define DEV_DISK    0x01        /* Disk category        */
  135. #define DEV_TERMINAL    0x02        /* Terminal category        */
  136. #define DEV_PRINTER    0x03        /* Printer category        */
  137. #define DEV_SPECIAL    0x04        /* Special category        */
  138.  
  139. /* Get status definitions for bus word (bus) */
  140. #define DEV_UB        0x00        /* Unibus bus            */
  141. #define DEV_QB        0x01        /* Qbus bus            */
  142. #define DEV_MB        0x02        /* Massbus bus            */
  143. #define DEV_BI        0x03        /* BI bus            */
  144. #define DEV_CI        0x04        /* CI bus            */
  145. #define DEV_NB        0x05        /* No Bus (single board VAX CPU)*/
  146. #define DEV_MSI        0x06        /* MSI bus            */
  147. #define DEV_SCSI    0x07        /* SCSI bus            */
  148.  
  149. /* Definition for any unsupported/unknown interface or device */
  150. #define DEV_UNKNOWN    "UNKNOWN"    /* Unknown interface/device    */
  151.  
  152. /* Definitions for interface character array (interface) */
  153. #define DEV_TM03    "TM03"        /* TM03 tape formatter        */
  154. #define DEV_TM78    "TM78"        /* TM78 tape formatter        */
  155. #define DEV_TSU11    "TSU11"     /* TSU11 tape controller    */
  156. #define DEV_TUU80    "TU80"         /* TU80 tape controller        */
  157. #define DEV_TSU05    "TSU05"     /* TSU05 tape controller    */
  158. #define DEV_TSV05    "TSV05"     /* TSV05 tape controller    */
  159. #define DEV_TQK50    "TQK50"     /* TQK50 tape controller    */
  160. #define DEV_TUK50    "TUK50"     /* TUK50 tape controller    */
  161. #define DEV_TQK70    "TQK70"     /* TQK70 tape controller    */
  162. #define DEV_TUK70    "TUK70"     /* TUK70 tape controller    */
  163. #define DEV_KLESI    "KLESI"     /* KLESI disk/tape controller    */
  164. #define DEV_DEBNT    "DEBNT"     /* DEBNT network/tape controller*/
  165. #define DEV_DSSC    "DSSC"        /* DSSC MSI controller        */
  166. #define DEV_HSC50    "HSC50"     /* HSC50 intelligent controller */
  167. #define DEV_HSC70    "HSC70"     /* HSC70 intelligent controller */
  168. #define DEV_HSB50    "HSB50"     /* HSB50 intelligent controller */
  169. #define DEV_RK711    "RK711"     /* RK711 disk controller    */
  170. #define DEV_RLU211    "RLU211"    /* RLU211 disk controller    */
  171. #define DEV_IDC     "IDC"        /* IDC integral disk controller */
  172. #define DEV_UDA50    "UDA50"     /* UDA50 disk controller    */
  173. #define DEV_UDA50A    "UDA50A"    /* UDA50 enhanced disk cont.    */
  174. #define DEV_RUX50    "RUX50"     /* RUX50 disk controller    */
  175. #define DEV_RH        "RH"        /* RH disk controller        */
  176. #define DEV_RLV211    "RLV211"    /* RLV211 disk controller    */
  177. #define DEV_RRD40    "RRD40"        /* RRD40 disk controller    */
  178. #define DEV_RRD50    "RRD50"     /* RRD50 disk controller    */
  179. #define DEV_RQDX1    "RQDX1"     /* RQDX1 disk controller    */
  180. #define DEV_RQDX2    "RQDX2"     /* RQDX2 disk controller    */
  181. #define DEV_RQDX3    "RQDX3"     /* RQDX3 disk controller    */
  182. #define DEV_RQDX4    "RQDX4"     /* RQDX4 disk controller    */
  183. #define DEV_KDA50    "KDA50"     /* KDA50 disk controller    */
  184. #define DEV_KDB50    "KDB50"     /* KDB50 disk controller    */
  185. #define DEV_KFQSA    "KFQSA"     /* KFQSA disk controller    */
  186. #define DEV_KFBTA    "KFBTA"     /* KFBTA disk controller    */
  187. #define DEV_AIO     "AIO"        /* AIO disk controller        */
  188. #define DEV_DZ11    "DZ11"        /* DZ11 terminal mux.        */
  189. #define DEV_DZ32    "DZ32"        /* DZ32 terminal mux.        */
  190. #define DEV_DHU11    "DHU11"     /* DHU11 terminal mux.        */
  191. #define DEV_DMF32    "DMF32"     /* DMF32 terminal mux.        */
  192. #define DEV_DMZ32    "DMZ32"     /* DMZ32 terminal mux.        */
  193. #define DEV_DZV11    "DZV11"     /* DZV11 terminal mux.        */
  194. #define DEV_DZQ11    "DZQ11"     /* DZQ11 terminal mux.        */
  195. #define DEV_DHQVCXY    "DHQVCXY"    /* DH(QV)11/CXY08 terminal mux. */
  196. #define DEV_CXAB16    "CXAB16"    /* CX(AB)16 terminal mux.    */
  197. #define DEV_DMB32    "DMB32"     /* DMB32 terminal mux.        */
  198. #define DEV_DHB32    "DHB32"        /* DHB32 terminal mux.          */
  199. #define DEV_VCB01    "VCB01"     /* VCB01 workstation controller */
  200. #define DEV_VCB02    "VCB02"     /* VCB02 workstation controller */
  201. #define DEV_LAT     "LAT"        /* LAT terminal server        */
  202. #define DEV_SCSI_GEN    "SCSI"        /* SCSI generic string        */
  203. /* VAXstation 2000 device name definitions */
  204. #define DEV_VS_SLU    "VS_SLU"    /* Serial line controller    */
  205. #define DEV_VS_DISK    "VS_DISK"    /* Disk controller        */
  206. #define DEV_VS_TAPE    "VS_TAPE"    /* TZK50 tape controller    */
  207. #define DEV_VS_NI    "VS_NI"     /* Ethernet controller        */
  208. #define DEV_TM_SLE    "TM_SLE"    /*                */
  209.  
  210. /* Definitions for device character array (device) */
  211. #define DEV_TE16    "TE16"        /* TE16 tape drive        */
  212. #define DEV_TU45    "TU45"        /* TU45 tape drive        */
  213. #define DEV_TU77    "TU77"        /* TU77 tape drive        */
  214. #define DEV_TU78    "TU78/9"    /* TU78/TU79 tape drive     */
  215. #define DEV_TS11    "TS11"        /* TS11 tape drive        */
  216. #define DEV_TU80    "TU80"        /* TU80 tape drive        */
  217. #define DEV_TS05    "TS05"        /* TS05 tape drive        */
  218. #define DEV_TU81    "TU81"        /* TU81 tape drive        */
  219. #define DEV_TU81E    "TU81E"     /* TU81E tape drive        */
  220. #define DEV_TK50    "TK50"        /* TK50 tape drive        */
  221. #define DEV_TK70    "TK70"        /* TK70 tape drive        */
  222. #define DEV_TZ30    "TZ30"        /* TZ30 tape drive        */
  223. #define DEV_TZ88    "TZ88"        /* TZ88 tape drive        */
  224. #define DEV_RV20    "RV20"        /* RV20 tape drive        */
  225. #define DEV_TA78    "TA78/9"    /* TA78/TA79 tape drive     */
  226. #define DEV_TA81    "TA81"        /* TA81 tape drive        */
  227. #define DEV_TA79    "TA79"        /* TA79 tape drive        */
  228. #define DEV_TA90    "TA90"        /* TA90 tape drive        */
  229. #define DEV_RV60    "RV60"        /* RV60 tape drive        */
  230. #define DEV_SVS00    "SVS00"        /* SVS00 tape drive        */
  231. #define DEV_ESE20    "ESE20"        /* ESE20 disk drive        */
  232. #define DEV_RK07    "RK07"        /* RK07 disk drive        */
  233. #define DEV_RL02    "RL02"        /* RL02 disk drive        */
  234. #define DEV_R80     "R80"        /* R80 disk drive        */
  235. #define DEV_RA60    "RA60"        /* RA60 disk drive        */
  236. #define DEV_RA80    "RA80"        /* RA80 disk drive        */
  237. #define DEV_RA81    "RA81"        /* RA81 disk drive        */
  238. #define DEV_RA82    "RA82"        /* RA82 disk drive        */
  239. #define DEV_RA70    "RA70"        /* RA70 disk drive        */
  240. #define DEV_RA90    "RA90"        /* RA90 disk drive        */
  241. #define DEV_RC25    "RC25"        /* RC25 disk drive        */
  242. #define DEV_RC25F    "RC25F"        /* RC25 fixed disk drive    */
  243. #define DEV_RD31    "RD31"        /* RD31 disk drive        */
  244. #define DEV_RD32    "RD32"        /* RD32 disk drive        */
  245. #define DEV_RD33    "RD33"        /* RD33 disk drive        */
  246. #define DEV_RD51    "RD51"        /* RD51 disk drive        */
  247. #define DEV_RD52    "RD52"        /* RD52 disk drive        */
  248. #define DEV_RD53    "RD53"        /* RD53 disk drive        */
  249. #define DEV_RF30    "RF30"        /* RF30 disk drive        */
  250. #define DEV_RF71    "RF71"        /* RF71 disk drive        */
  251. #define DEV_RD54    "RD54"        /* RD54 disk drive        */
  252. #define DEV_RX18    "RX18"        /* RX18 disk drive        */
  253. #define DEV_RX33    "RX33"        /* RX33 disk drive        */
  254. #define DEV_RX35    "RX35"        /* RX33 disk drive        */
  255. #define DEV_RX50    "RX50"        /* RX50 disk drive        */
  256. #define DEV_RZ22    "RZ22"        /* RZ22 disk drive        */
  257. #define DEV_RZ23    "RZ23"        /* RZ23 disk drive        */
  258. #define DEV_RZ55    "RZ55"        /* RZ55 disk drive        */
  259. #define DEV_RM03    "RM03"        /* RM03 disk drive        */
  260. #define DEV_RM05    "RM05"        /* RM05 disk drive        */
  261. #define DEV_RM80    "RM80"        /* RM80 disk drive        */
  262. #define DEV_RP05    "RP05"        /* RP05 disk drive        */
  263. #define DEV_RP06    "RP06"        /* RP06 disk drive        */
  264. #define DEV_RP07    "RP07"        /* RP07 disk drive        */
  265. #define DEV_RAMDISK    "RAMDISK"    /* RAM memory disk        */
  266. #define DEV_VT100    "VT100"     /* VT100 terminal        */
  267. #define DEV_VT101    "VT101"     /* VT101 terminal        */
  268. #define DEV_VT102    "VT102"     /* VT102 terminal        */
  269. #define DEV_VT125    "VT125"     /* VT125 terminal        */
  270. #define DEV_VT220    "VT220"     /* VT220 terminal        */
  271. #define DEV_VT240    "VT240"     /* VT240 terminal        */
  272. #define DEV_VT241    "VT241"     /* VT241 terminal        */
  273. #define DEV_VT320    "VT320"     /* VT320 terminal        */
  274. #define DEV_VT330    "VT330"     /* VT330 terminal        */
  275. #define DEV_VT340    "VT340"     /* VT340 terminal        */
  276. #define DEV_VR100    "VR100"     /* VR100 terminal        */
  277. #define DEV_VR260    "VR260"     /* VR260 terminal        */
  278. #define DEV_VR290    "VR290"     /* VR290 terminal        */
  279. #define DEV_MOUSE    "VSXXXAA"    /* Graphics serial mouse    */
  280. #define DEV_TABLET    "VSXXXAB"    /* Graphics tablet        */
  281. #define DEV_TRACE    "TRACE"     /* TRACE special device     */
  282. #define DEV_XOS     "XOS"        /* X in kernel special device    */
  283.  
  284. /* Definitions for stat longword (stat) */
  285. #define DEV_BOM     0x01        /* Beginning-of-medium (BOM)    */
  286. #define DEV_EOM     0x02        /* End-of-medium (EOM)        */
  287. #define DEV_OFFLINE    0x04        /* Offline            */
  288. #define DEV_WRTLCK    0x08        /* Write locked         */
  289. #define DEV_BLANK    0x10        /* Blank media            */
  290. #define DEV_WRITTEN    0x20        /* Write on last operation    */
  291. #define DEV_CSE     0x40        /* Cleared serious exception    */
  292. #define DEV_SOFTERR    0x80        /* Device soft error        */
  293. #define DEV_HARDERR    0x100        /* Device hard error        */
  294. #define DEV_DONE    0x200        /* Operation complete        */
  295. #define DEV_RETRY    0x400        /* Retry            */
  296. #define DEV_ERASED    0x800        /* Erased            */
  297.  
  298. /* Definitions for category_stat longword (category_stat) */
  299. #define DEV_TPMARK    0x01        /* Unexpected tape mark     */
  300. #define DEV_SHRTREC    0x02        /* Short record         */
  301. #define DEV_RDOPP    0x04        /* Read opposite        */
  302. #define DEV_RWDING    0x08        /* Rewinding            */
  303. #define DEV_800BPI    0x10        /* 800 bpi tape density     */
  304. #define DEV_1600BPI    0x20        /* 1600 bpi tape density    */
  305. #define DEV_6250BPI    0x40        /* 6250 bpi tape density    */
  306. #define DEV_6666BPI    0x80        /* 6666 bpi tape density    */
  307. #define DEV_10240BPI    0x100        /* 10240 bpi tape density    */
  308. #define DEV_DISKPART    minor(dev)%0x08 /* Disk partition macro     */
  309. #define DEV_MODEM    0x01        /* Line supports modem control    */
  310. #define DEV_MODEM_ON    0x02        /* Modem control is turned on    */
  311.